package com.neusoft.neuiotms.dcom.model.insurance;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;
import com.neusoft.neuiotms.dcom.model.hn.HnInspectionItem;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@Table(name = "neuiot_insurance_inspection_task_item")
@org.hibernate.annotations.Table(appliesTo = "neuiot_insurance_inspection_task_item", comment = "重保服务巡检任务内容表")
public class InsuranceInspectionTaskItem extends AbstractAuditModel {

    private static final long serialVersionUID = 1478623380941207986L;

    @ManyToOne
    private HnInspectionItem item;

    private boolean isException;

    @Length(max = 255, message = "值不能超过{max}位")
    @Column(length = 255)
    @Comment("varchar(255) COMMENT '值'")
    private String value;

    @Length(max = 255, message = "异常原因不能超过{max}位")
    @Column(length = 255)
    @Comment("varchar(255) COMMENT '异常原因'")
    private String reason;

    /** 关联重保巡检任务表 */
    @ManyToOne
    private InsuranceInspectionTask inspectionTask;

}
